package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;

import net.sf.jsqlparser.expression.DateTimeLiteralExpression.DateTime;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the return_goods database table.
 * 
 */
@Entity
@Table(name="return_goods")
@NamedQuery(name="ReturnGood.findAll", query="SELECT r FROM ReturnGood r")
public class ReturnGood implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="return_goods_id")
	private int returnGoodsId;

	@Column(name="return_goods_allquantity")
	private int returnGoodsAllquantity;

	@Column(name="return_goods_checkpeople")
	private String returnGoodsCheckpeople;

	@Column(name="return_goods_head")
	private String returnGoodsHead;

	@Lob
	@Column(name="return_goods_reason")
	private String returnGoodsReason;

	@Column(name="return_goods_state")
	private int returnGoodsState;

	@Column(name="return_goods_time")
	private Timestamp returnGoodsTime;

	@Column(name="return_goods_total")
	private BigDecimal returnGoodsTotal;
	
	@Column(name="return_goods_type")
	private String returnGoodsType;

	//bi-directional many-to-one association to Supplier
	@ManyToOne
	@JoinColumn(name="supplier_number")
	private Supplier supplier;

	//bi-directional many-to-one association to ReturnGoodsDetail
	@OneToMany(mappedBy="returnGood")
	private List<ReturnGoodsDetail> returnGoodsDetails;

	public ReturnGood() {
	}

	public int getReturnGoodsId() {
		return this.returnGoodsId;
	}

	public void setReturnGoodsId(int returnGoodsId) {
		this.returnGoodsId = returnGoodsId;
	}

	public int getReturnGoodsAllquantity() {
		return this.returnGoodsAllquantity;
	}

	public void setReturnGoodsAllquantity(int returnGoodsAllquantity) {
		this.returnGoodsAllquantity = returnGoodsAllquantity;
	}

	public String getReturnGoodsCheckpeople() {
		return this.returnGoodsCheckpeople;
	}

	public void setReturnGoodsCheckpeople(String returnGoodsCheckpeople) {
		this.returnGoodsCheckpeople = returnGoodsCheckpeople;
	}

	public String getReturnGoodsHead() {
		return this.returnGoodsHead;
	}

	public void setReturnGoodsHead(String returnGoodsHead) {
		this.returnGoodsHead = returnGoodsHead;
	}

	public String getReturnGoodsReason() {
		return this.returnGoodsReason;
	}

	public void setReturnGoodsReason(String returnGoodsReason) {
		this.returnGoodsReason = returnGoodsReason;
	}

	public int getReturnGoodsState() {
		return this.returnGoodsState;
	}

	public void setReturnGoodsState(int returnGoodsState) {
		this.returnGoodsState = returnGoodsState;
	}

	

	public Timestamp getReturnGoodsTime() {
		return returnGoodsTime;
	}

	public void setReturnGoodsTime(Timestamp returnGoodsTime) {
		this.returnGoodsTime = returnGoodsTime;
	}

	public BigDecimal getReturnGoodsTotal() {
		return this.returnGoodsTotal;
	}

	public void setReturnGoodsTotal(BigDecimal returnGoodsTotal) {
		this.returnGoodsTotal = returnGoodsTotal;
	}

	public Supplier getSupplier() {
		return this.supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}

	public List<ReturnGoodsDetail> getReturnGoodsDetails() {
		return this.returnGoodsDetails;
	}

	public void setReturnGoodsDetails(List<ReturnGoodsDetail> returnGoodsDetails) {
		this.returnGoodsDetails = returnGoodsDetails;
	}

	public ReturnGoodsDetail addReturnGoodsDetail(ReturnGoodsDetail returnGoodsDetail) {
		getReturnGoodsDetails().add(returnGoodsDetail);
		returnGoodsDetail.setReturnGood(this);

		return returnGoodsDetail;
	}

	public ReturnGoodsDetail removeReturnGoodsDetail(ReturnGoodsDetail returnGoodsDetail) {
		getReturnGoodsDetails().remove(returnGoodsDetail);
		returnGoodsDetail.setReturnGood(null);

		return returnGoodsDetail;
	}

	public String getReturnGoodsType() {
		return returnGoodsType;
	}

	public void setReturnGoodsType(String returnGoodsType) {
		this.returnGoodsType = returnGoodsType;
	}
}
